Skip to content

Conversation

lizlooney
Copy link
Collaborator

@lizlooney lizlooney commented Aug 15, 2025

Add support for mechanism event handlers

…om arrow functions to function declarations.

See https://google.github.io/styleguide/tsguide.html#function-declarations

In mrc_call_python_function.ts:
Removed unnecessary semicolon.
Changed "...method on a mechanism..." to "...method in a mechanism...".
Renamed RobotEventsCategory to RobotEventHandlersCategory.

In editor.ts, updated code that parses the module content text for the robot and mechanisms to use ? : instead of if/else.
…gory, and RobotEventHandlersCategory from hardware_category.ts to event_handlers_category.ts.
…anism events.

Use the block id of the mrc_event blocks to identify which event handlers are already on the workspace.
Changed custom values to begin with MRC_.
@lizlooney lizlooney requested a review from alan412 August 15, 2025 04:20
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I pulled it down and ran it as well as looking through the changes.

@alan412 alan412 merged commit a23ce38 into wpilibsuite:main Aug 18, 2025
1 check passed
@lizlooney lizlooney deleted the pr_mechanism_event_handlers branch August 19, 2025 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants